package studia.figlewicz.dao.ejb;

// Generated 2011-06-03 08:31:30 by Hibernate Tools 3.4.0.CR1

import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * Wycenanogi generated by hbm2java
 */
@Entity
@Table(name = "WYCENANOGI", schema = "MARCIN")
public class Wycenanogi implements java.io.Serializable {

	private WycenanogiId id;
	private Wycenainstrumentu wycenainstrumentu;
	private Nogainstrumentu nogainstrumentu;
	private BigDecimal cenarealna;
	private BigDecimal delta;
	private BigDecimal gamma;
	private BigDecimal rho;
	private BigDecimal vega;
	private Wycenaplatnosci wycenaplatnosci;

	public Wycenanogi() {
	}

	public Wycenanogi(WycenanogiId id, Wycenainstrumentu wycenainstrumentu,
			Nogainstrumentu nogainstrumentu) {
		this.id = id;
		this.wycenainstrumentu = wycenainstrumentu;
		this.nogainstrumentu = nogainstrumentu;
	}

	public Wycenanogi(WycenanogiId id, Wycenainstrumentu wycenainstrumentu,
			Nogainstrumentu nogainstrumentu, BigDecimal cenarealna,
			BigDecimal delta, BigDecimal gamma, BigDecimal rho,
			BigDecimal vega, Wycenaplatnosci wycenaplatnosci) {
		this.id = id;
		this.wycenainstrumentu = wycenainstrumentu;
		this.nogainstrumentu = nogainstrumentu;
		this.cenarealna = cenarealna;
		this.delta = delta;
		this.gamma = gamma;
		this.rho = rho;
		this.vega = vega;
		this.wycenaplatnosci = wycenaplatnosci;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "nazwaportfela", column = @Column(name = "NAZWAPORTFELA", nullable = false, length = 50)),
			@AttributeOverride(name = "datawyceny", column = @Column(name = "DATAWYCENY", nullable = false, length = 7)),
			@AttributeOverride(name = "kodumowyinstrumentu", column = @Column(name = "KODUMOWYINSTRUMENTU", nullable = false, length = 20)),
			@AttributeOverride(name = "stronanogi", column = @Column(name = "STRONANOGI", nullable = false, length = 6)) })
	public WycenanogiId getId() {
		return this.id;
	}

	public void setId(WycenanogiId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({
			@JoinColumn(name = "NAZWAPORTFELA", referencedColumnName = "NAZWAPORTFELA", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "DATAWYCENY", referencedColumnName = "DATAWYCENY", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "KODUMOWYINSTRUMENTU", referencedColumnName = "KODUMOWYINSTRUMENTU", nullable = false, insertable = false, updatable = false) })
	public Wycenainstrumentu getWycenainstrumentu() {
		return this.wycenainstrumentu;
	}

	public void setWycenainstrumentu(Wycenainstrumentu wycenainstrumentu) {
		this.wycenainstrumentu = wycenainstrumentu;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({
			@JoinColumn(name = "KODUMOWYINSTRUMENTU", referencedColumnName = "KODUMOWY", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "STRONANOGI", referencedColumnName = "STRONANOGI", nullable = false, insertable = false, updatable = false) })
	public Nogainstrumentu getNogainstrumentu() {
		return this.nogainstrumentu;
	}

	public void setNogainstrumentu(Nogainstrumentu nogainstrumentu) {
		this.nogainstrumentu = nogainstrumentu;
	}

	@Column(name = "CENAREALNA", precision = 24, scale = 12)
	public BigDecimal getCenarealna() {
		return this.cenarealna;
	}

	public void setCenarealna(BigDecimal cenarealna) {
		this.cenarealna = cenarealna;
	}

	@Column(name = "DELTA", precision = 24, scale = 12)
	public BigDecimal getDelta() {
		return this.delta;
	}

	public void setDelta(BigDecimal delta) {
		this.delta = delta;
	}

	@Column(name = "GAMMA", precision = 24, scale = 12)
	public BigDecimal getGamma() {
		return this.gamma;
	}

	public void setGamma(BigDecimal gamma) {
		this.gamma = gamma;
	}

	@Column(name = "RHO", precision = 24, scale = 12)
	public BigDecimal getRho() {
		return this.rho;
	}

	public void setRho(BigDecimal rho) {
		this.rho = rho;
	}

	@Column(name = "VEGA", precision = 24, scale = 12)
	public BigDecimal getVega() {
		return this.vega;
	}

	public void setVega(BigDecimal vega) {
		this.vega = vega;
	}

	@OneToOne(fetch = FetchType.LAZY, mappedBy = "wycenanogi")
	public Wycenaplatnosci getWycenaplatnosci() {
		return this.wycenaplatnosci;
	}

	public void setWycenaplatnosci(Wycenaplatnosci wycenaplatnosci) {
		this.wycenaplatnosci = wycenaplatnosci;
	}

}
